package com.new2i.dao.mapper;

import java.util.HashMap;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.new2i.model.ScreenSchoolEntity;

/**
 * 筛查学校ORM mapper
 * 
 * @since 2015/09/22
 * @author 2i
 *
 */
public interface ScreenSchoolMapper {

	/**
	 * 创建筛查医生绑定关系
	 * 
	 * @author 2i
	 * @since 2015/09/22
	 * @param scDoctor
	 * @return
	 */
	Integer insertScreenSchool(ScreenSchoolEntity scSchool);

	/**
	 * 根据创建医生的id获取其所有的筛查医生
	 * 
	 * @since 2015/09/22
	 * @param tel
	 * @param doctor_id
	 * @param start
	 * @param offset
	 * @return
	 */
	List<HashMap<String, Object>> selectScreenSchoolList(@Param("doctor_id") final Integer doctor_id,
			@Param("start") final Integer start, @Param("offset") final Integer offset);

	/**
	 * 通过tel查询医生的详细信息
	 * 
	 * @author 2i
	 * @since 2015/09/22
	 * @param tel
	 * @return
	 */
	HashMap<String, Object> getScreenSchoolById(@Param("sc_school_id") final Integer sc_school_id);

	/**
	 * 修改筛查学校的登录密码
	 * 
	 * @author 2i
	 * @since 2015/09/24
	 * @param scSchool
	 * @return
	 */
	Integer updateScreenSchool(ScreenSchoolEntity scSchool);

	/**
	 * 移除（软删除）筛查学校
	 * 
	 * @author 2i
	 * @since 2015/09/24
	 * @param sc_school_id
	 * @param doctor_id
	 * @return
	 */
	Integer removeScreenSchool(@Param("sc_school_id") final Integer sc_school_id,
			@Param("doctor_id") final Integer doctor_id);

	/**
	 * 还原筛查学校
	 * 
	 * @author 2i
	 * @since 2015/09/24
	 * @param sc_school_id
	 * @param doctor_id
	 * @return
	 */
	Integer backupScreenSchool(@Param("sc_school_id") final Integer sc_school_id,
			@Param("doctor_id") final Integer doctor_id);

	/**
	 * 删除筛查学校
	 * 
	 * @author 2i
	 * @since 2015/09/24
	 * @param sc_school_id
	 * @param doctor_id
	 * @return
	 */
	Integer deleteScreenSchool(@Param("sc_school_id") final Integer sc_school_id,
			@Param("doctor_id") final Integer doctor_id);

}
